﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>留言板</title>
<meta name="decorator" content="default" />
<meta name="viewport"
	content="width=device-width initial-scale=1.0  maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="format-detection" content="telephone=no">
<link href="${ctxStatic}/mobile-template/sun/css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

	$(document).ready(function() {
		var userName = "${userName}";
		$("#userName").val(userName);
		var mobile = "${mobile}";
		$("#mobile").val(mobile);
	});

/**
 * 
 **/
function showGuestBook(orderId,timeId){
	
	var uid = '${uid}';
	var wid = '${wechatId}';
	
	var message = $('#message_'+orderId).val();
	var params = {'uid':uid,'wechatId':wid,'message':message,'boid':orderId };
	$.post('${ctxFront}/wechat/book/guestBook/doNotimebook',params,function(data){
		if(data.result == 'ok'){
			alert('您的预订信息已成功发送,我们的服务人员稍后会联系您，谢谢!');
			$('#btn_'+orderId).attr("disabled","disabled");
		}else{
			alert("很抱歉，未能成功预订，请联系我们的服务人员.谢谢！");
		}
	},'json');
	
}
</script>



</head>
<body>
<div class="warp">
<!--头部 begin-->
<header>
<h1>留言板</h1>
</header>
<!--头部 end-->

<section class="sec_box_1">
	<div align="center">
		<form action="${ctxFront }/mom/guestBook/save" method="post" >
			<input type="hidden" name="uid" value="${uid }"/>
			<input type="hidden" name="openId" value="${openId }"/>
			<div class="modal-body">
				<p>昵称:&nbsp;<input type="text" name="userName" id="userName"/> </p>
				<p>手机:&nbsp;<input type="text" name="mobile" id="mobile"/> </p>
				<p>内容:&nbsp;<textarea rows="5" cols="15" name="content"></textarea> </p>
			</div>
			<button type="submit" class="btn btn-warning">提交留言</button>
		</form>
	</div>
</section>

<!--section begin-->
<section class="sec_box_1">



<c:if test="${not empty  page.list  }">
 <ul class="ull_style_1">
 	<c:forEach items="${page.list }" varStatus="s" var="guestBook">
	  <li>  <span class="number">${s.index +1 }</span><a href="#"  id="a_${guestBook.id }"     data-toggle="modal" data-target="A#A##myModal_${guestBook.id }">${guestBook.content } </a>
	  		<button type="button"  id="btn_${guestBook.id }"   class="i_style_1"  data-toggle="modal" data-target="#myModal_${guestBook.id }"></button>
	  		<div id="myModal_${guestBook.id }" class="modal hide fade " tabindex="-1" style="width:300px"
									role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
										<h3 id="myModalLabel">${guestBook.content} </h3>
									</div>
									<div class="modal-body">
										<p>${guestBook.reply }</p>
									</div>
									<div class="modal-footer">
										<button class="bt_style_1" data-dismiss="modal" aria-hidden="true">关闭</button>
									</div>
			</div> <!-- 回复内容 结束-->
	  		
	  </li>
	  <li> 
			 <b>答复:</b> &nbsp; ${guestBook.reply } 
	  </li>
 	</c:forEach>
 
 </ul>
 </c:if>
</section>
<!--section end-->



</div>
</body>
</html>